package com.yi.gostockgo.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.time.LocalDate;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 每日收益
 * </p>
 *
 * @author liandyao
 * @since 2020-04-19
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
public class GoToday extends Model<GoToday> {

    private static final long serialVersionUID=1L;

    /**
     * 每日收入主键
     */
    @TableId(value = "today_id", type = IdType.ASSIGN_ID)
    private String todayId;

    /**
     * 交易主键
     */
    private String transId;

    /**
     * 股票编码
     */
    private String stockCode;

    /**
     * 股票名称
     */
    private String stockName;

    /**
     * 日期
     */
    private LocalDate todayDate;

    /**
     * 购入价
     */
    private Integer price;

    /**
     * 当日收盘价
     */
    private Integer endPrice;

    /**
     * 当日开盘价
     */
    private Integer startPrice;

    /**
     * 收益
     */
    private Integer earnings;

    /**
     * 收益率
     */
    private Double yield;

    /**
     * 当日排名
     */
    private Integer rankings;


    @Override
    protected Serializable pkVal() {
        return this.todayId;
    }

}
